//
//  EMNavigationController.m
//  EasyMoney
//
//  Created by zh on 2019/12/14.
//  Copyright © 2019 zh. All rights reserved.
//

#import "EMNavigationController.h"

@interface EMNavigationController ()<UIGestureRecognizerDelegate, UINavigationControllerDelegate>

@property (nonatomic, weak) UIViewController* currentVC;

@end


@implementation EMNavigationController

+ (void)initialize
{
    UINavigationBar *navBar = [UINavigationBar appearance];
    navBar.barTintColor = EMMainNavColor;
    navBar.translucent = NO;
    NSDictionary *dict = @{NSForegroundColorAttributeName : ColorFromRGB(0xffffff),NSFontAttributeName:FONT_PINGFANG_REGULAR_(17)};
    navBar.tintColor = ColorFromRGB(0xffffff);
    navBar.shadowImage = [UIImage new];
    [navBar setTitleTextAttributes:dict];
}

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController
{
    self = [super initWithRootViewController:rootViewController];
    if (self) {
        [self setNavigationBarHidden:YES];
    }
    return self;
}

-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [super pushViewController:viewController animated:animated];
}

-(UIViewController *)popViewControllerAnimated:(BOOL)animated
{
    UIViewController* topVc = [super popViewControllerAnimated:animated];
    return topVc;
}

-(NSArray<UIViewController *> *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    NSArray* array = [super popToViewController:viewController animated:animated];
    return array;
}

-(NSArray<UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated
{
    NSArray* array = [super popToRootViewControllerAnimated:animated];
    return array;
}

@end
